package com.maywide.jdp.system.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Organization;

/**
 * 机构管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface OrganizationService extends LockedService, MovedService {

	/**
	 * 新增机构
	 * 
	 * @param organization
	 *            机构对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Organization 新增后的对象
	 */
	public Organization insert(Organization organization,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改机构
	 * 
	 * @param organizationVO
	 *            机构对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Organization 修改后的对象
	 */
	public Organization update(Organization organizationVO,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 应用机构修改
	 * 
	 * @param organizationVO
	 *            机构对象
	 * @param appType 应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return Organization 修改后的对象
	 */
	public Organization updateApp(Organization organizationVO,String appType,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 读取机构
	 * 
	 * @param id
	 *            机构ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Organization 读取的机构对象
	 */
	public Organization load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;
}
